package com.hson.demo.base.util.web;


/**
 * MysqlDialect.
 */
public class MysqlDialect  {
		
	public static String paginateSql(String sql ,  int pageNumber , int pageSize ) {
		StringBuilder pageSql  = new StringBuilder();
		pageSql.append(sql);
		int offset = pageSize * (pageNumber - 1);
		pageSql.append(" limit ").append(offset).append(", ").append(pageSize);	// limit can use one or two '?' to pass paras
		return pageSql.toString() ;
	}

}
